<!--
XML Schema for the SMIL 2.0 Animation functionality.

This is SMIL 2.0
Copyright: 1998-2004 W3C (MIT, ERCIM, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/.

Public URI: http://www.w3.org/2001/SMIL20/smil20-animate.xsd
Author: Aaron Michael Cohen (Intel)
Revision: 2001/07/31
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:smil20="http://www.w3.org/2001/SMIL20/"
        xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language"        
        targetNamespace="http://www.w3.org/2001/SMIL20/"
        elementFormDefault="qualified">

    <!-- 
        in general, an integration language should include only
        one of "animTargetAttrs" and "animTargetXLinkAttrs"
    -->        
    <attributeGroup name="animTargetAttrs">
        <attribute name="targetElement" type="IDREF" use="optional" />   
    </attributeGroup>

    <attributeGroup name="animTargetXLinkAttrs">        
        <attribute name="actuate" use="optional"  default="onLoad">
            <simpleType>
                <restriction base="string">
                    <enumeration value="onLoad"/>
                    <enumeration value="onRequest"/>
                </restriction>
            </simpleType>
        </attribute>
           
        <attribute name="href" type="anyURI" use="optional"/>
           
        <attribute name="show" use="optional"  default="embed">
            <simpleType>
                <restriction base="string">
                    <enumeration value="new"/>
                    <enumeration value="embed"/>
                    <enumeration value="replace"/>
                </restriction>
            </simpleType>
        </attribute>
           
        <attribute name="type" use="optional"  default="simple">   
            <simpleType>
                <restriction base="string">
                    <enumeration value="simple"/>
                    <enumeration value="extended"/>
                    <enumeration value="locator"/>
                    <enumeration value="arc"/>
                </restriction>
            </simpleType>
        </attribute>
    </attributeGroup>

    <attributeGroup name="animNamedTargetAttrs">        
        <attribute name="attributeName" type="string" use="required"/>
        <attribute name="attributeType" use="optional"  default="auto">
            <simpleType>
                <restriction base="string">
                    <enumeration value="XML"/>
                    <enumeration value="CSS"/>
                    <enumeration value="auto"/>
                </restriction>
            </simpleType>
        </attribute>
    </attributeGroup>

    <!-- 
        'spline' is only included with SplineAnimation module, 
         but it is not clear how to exclude it otherwise, so we
         have two otherwise identical attribute groups, 'animModeAttrs'
         and 'animSplineModeAttrs', that only differ by included the 'spline'
         attribute value. Use one or the other of these.
    -->
    <attributeGroup name="animModeAttrs">        
        <attribute name="calcMode" use="optional"  default="linear">   
            <simpleType>
                <restriction base="string">
                    <enumeration value="discrete"/>
                    <enumeration value="linear"/>
                    <enumeration value="paced"/>
                </restriction>
            </simpleType>
        </attribute>
    </attributeGroup>

    <attributeGroup name="animSplineModeAttrs">        
        <attribute name="calcMode" use="optional"  default="linear">   
            <simpleType>
                <restriction base="string">
                    <enumeration value="discrete"/>
                    <enumeration value="linear"/>
                    <enumeration value="paced"/>
                    <enumeration value="spline"/>
                </restriction>
            </simpleType>
        </attribute>
    </attributeGroup>

    <!-- 
        include the next two attribute groups only if the 
        SplineAnimation module is included 
    -->
    <attributeGroup name="splineAnimValueAttrs">        
        <attribute name="keyTimes" type="string" use="optional"/>
        <attribute name="keySplines" type="string" use="optional"/>
    </attributeGroup>

    <attributeGroup name="splineAnimPathAttrs">        
        <attribute name="path" type="string" use="optional"/>
    </attributeGroup>

    <attributeGroup name="animAddAccumAttrs">        
        <attribute name="additive" use="optional"  default="replace">   
            <simpleType>
                <restriction base="string">
                    <enumeration value="replace"/>
                    <enumeration value="sum"/>
                </restriction>
            </simpleType>
        </attribute>

        <attribute name="accumulate" use="optional"  default="none">   
            <simpleType>
                <restriction base="string">
                    <enumeration value="none"/>
                    <enumeration value="sum"/>
                </restriction>
            </simpleType>
        </attribute>
    </attributeGroup>

    <attributeGroup name="animSetValuesAttrs">        
        <attribute name="to" use="optional" type="string"/>   
    </attributeGroup>

    <attributeGroup name="animValuesAttrs">        
        <attributeGroup ref="smil20:animSetValuesAttrs"/>
        <attribute name="from" use="optional" type="string"/>   
        <attribute name="by" use="optional" type="string"/>   
        <attribute name="values" use="optional" type="string"/>   
    </attributeGroup>

    <complexType name="animatePrototype">
        <attributeGroup ref="smil20:animNamedTargetAttrs"/>
        <attributeGroup ref="smil20:animAddAccumAttrs"/>        
        <attributeGroup ref="smil20:animValuesAttrs"/> 
    </complexType>

    <complexType name="setPrototype">
        <attributeGroup ref="smil20:animNamedTargetAttrs"/>
        <attributeGroup ref="smil20:animSetValuesAttrs"/> 
    </complexType>

    <complexType name="animateMotionPrototype">
        <attributeGroup ref="smil20:animAddAccumAttrs"/>        
        <attributeGroup ref="smil20:animValuesAttrs"/> 
        <attribute name="origin" type="string" use="optional"/>
    </complexType>

    <complexType name="animateColorPrototype">
        <attributeGroup ref="smil20:animNamedTargetAttrs"/>
        <attributeGroup ref="smil20:animAddAccumAttrs"/>        
        <attributeGroup ref="smil20:animValuesAttrs"/> 
    </complexType>

    <!-- global animate element -->
    <element name="animate" type="smil20lang:animateType" substitutionGroup="smil20lang:animate"/>    
    <complexType name="animateType">
        <complexContent>
            <extension base="smil20:animatePrototype">                
                <choice minOccurs="0" maxOccurs="unbounded">
                    <any namespace="##other" processContents="lax"/>
                </choice>
                <attributeGroup ref="smil20:animTargetAttrs"/>
                <attributeGroup ref="smil20:skipContentAttrs"/>
                <attributeGroup ref="smil20:animSplineModeAttrs"/>        
                <attributeGroup ref="smil20:splineAnimValueAttrs"/>        
                <attributeGroup ref="smil20:splineAnimPathAttrs"/>        
                <anyAttribute namespace="##any" processContents="strict"/>
            </extension>
        </complexContent>
    </complexType>

    <!-- global animateMotion element -->
    <element name="animateMotion" type="smil20lang:animateMotionType" substitutionGroup="smil20lang:animateMotion"/>    
    <complexType name="animateMotionType">
        <complexContent>
            <extension base="smil20:animateMotionPrototype">                
                <choice minOccurs="0" maxOccurs="unbounded">
                    <any namespace="##other" processContents="lax"/>
                </choice>
                <attributeGroup ref="smil20:animTargetAttrs"/>
                <attributeGroup ref="smil20:skipContentAttrs"/>
                <attributeGroup ref="smil20:animSplineModeAttrs"/>        
                <attributeGroup ref="smil20:splineAnimValueAttrs"/>        
                <attributeGroup ref="smil20:splineAnimPathAttrs"/>        
                <anyAttribute namespace="##any" processContents="strict"/>
            </extension>
        </complexContent>
    </complexType>

    <!-- global animateColor element -->
    <element name="animateColor" type="smil20lang:animateColorType" substitutionGroup="smil20lang:animateColor"/>    
    <complexType name="animateColorType">
        <complexContent>
            <extension base="smil20:animateColorPrototype">                
                <choice minOccurs="0" maxOccurs="unbounded">
                    <any namespace="##other" processContents="lax"/>
                </choice>
                <attributeGroup ref="smil20:animTargetAttrs"/>
                <attributeGroup ref="smil20:skipContentAttrs"/>
                <attributeGroup ref="smil20:animSplineModeAttrs"/>        
                <attributeGroup ref="smil20:splineAnimValueAttrs"/>        
                <attributeGroup ref="smil20:splineAnimPathAttrs"/>        
                <anyAttribute namespace="##any" processContents="strict"/>
            </extension>
        </complexContent>
    </complexType>

    <!-- global set element -->
    <element name="set" type="smil20lang:setType" substitutionGroup="smil20lang:set"/>    

</schema>    
